#ifndef QCLIENTSOCKET_H
#define QCLIENTSOCKET_H


#include <QObject>
#include <QUdpSocket>
#include "common.h"

class QMsg;

class QClientSocket : public QUdpSocket
{
    //使用Qt 信号-槽 机制，必须在类定义里包含 Q_OBJECT
    //使用Qt 信号-槽 机制，类必须是QObject基类的派生，或者QObject派生的派生
    Q_OBJECT;

public:
    explicit QClientSocket(QObject *parent = nullptr); //构造函数
    ~QClientSocket();

    void sendMsg(QMsg *pMsg); //发送消息
};


#endif // QCLIENTSOCKET_H
